package com.sealer.ch3_4.config;

import com.sealer.ch3_4.model.Student;
import com.sealer.ch3_4.service.Teach;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by sealer on 17/04/11.
 */
@Configuration
public class SpringConfig {
    @Bean
    public Teach teach() {
        Teach teach = new Teach();
        teach.setStudent(student());
        return teach;
    }

    @Bean
    public Student student() {
        Student student = new Student();
        student.setName("Sealer");
        student.setNo("no0001");
        return student;
    }
}
